﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Data;
using OgilvyOne.BLL;

public partial class allergy_lore_lore : System.Web.UI.Page
{
    protected string ename;
    protected string yuanyinename;
    protected string zhengename;
    protected string fengename;
    protected string titles;
    protected string meta_kwords;
    protected string meta_desc;

    protected void Page_Load(object sender, EventArgs e)
    {
        DataTable dtable = BLLArticleInfo.getEname("197");
        foreach (DataRow row in dtable.Rows)
        {
            ename = row["ECLASSNAME"].ToString();
        }

        DataTable dtable1 = BLLArticleInfo.getEname("199");
        foreach (DataRow row in dtable1.Rows)
        {
            yuanyinename = row["ECLASSNAME"].ToString();
        }

        DataTable dtable2 = BLLArticleInfo.getEname("198");
        foreach (DataRow row in dtable2.Rows)
        {
            zhengename = row["ECLASSNAME"].ToString();
        }

        DataTable dtable3 = BLLArticleInfo.getEname("200");
        foreach (DataRow row in dtable3.Rows)
        {
            fengename = row["ECLASSNAME"].ToString();
        }

        DataTable seodt = BLLArticleInfo.getSeoInfo("196");
        foreach (DataRow seorows in seodt.Rows)
        {
            titles = seorows["Columntitle"].ToString();
            meta_kwords = seorows["ColumnKeyword"].ToString();
            meta_desc = seorows["ColumnDesc"].ToString();
        }


        //什么是过敏
        this.shenme_rpt.DataSource = BLLArticleInfo.selecta();
        this.shenme_rpt.DataBind();

        //宝宝过敏原因
        this.yuanyin_rpt.DataSource = BLLArticleInfo.selectb("199");
        this.yuanyin_rpt.DataBind();

        //宝宝常见过敏症状
        this.zhengzhuang_rpt.DataSource = BLLArticleInfo.selectc("198");
        this.zhengzhuang_rpt.DataBind();

        //为什么宝宝过敏风险高
        this.fengxian_rpt.DataSource = BLLArticleInfo.selectc("200");
        this.fengxian_rpt.DataBind();

        //banner 你知道吗
        this.banner_rpt.DataSource = BLLArticleInfo.selectc("isbanner", "1");
        this.banner_rpt.DataBind();
        
        //妈妈要知道
        this.doKnow_rpt.DataSource = BLLArticleInfo.selectc("5", "doKnow", "1");
        this.doKnow_rpt.DataBind();
        //研究
        this.yanjiu_rpt.DataSource = BLLArticleInfo.selArticle("89");
        this.yanjiu_rpt.DataBind();



    }
    private int i = 2;
    protected void zhengzhuang_rpt_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        HtmlControl p = e.Item.FindControl("p") as HtmlControl;
        if (i % 2 == 0)
        {
            p.Attributes.Add("class", "s");
        }
        i++;
    }

}
